import request from '@/utils/request'

// 查询商户列表
export function listGarage(query) {
  return request({
    url: '/function/garage/list',
    method: 'get',
    params: query
  })
}

// 查询商户详细
export function getGarage(id) {
  return request({
    url: '/function/garage/' + id,
    method: 'get'
  })
}

// 新增商户
export function addGarage(data) {
  return request({
    url: '/function/garage',
    method: 'post',
    data: data
  })
}

// 修改商户
export function updateGarage(data) {
  return request({
    url: '/function/garage',
    method: 'put',
    data: data
  })
}
// 审核资质
export function putCheck(data) {
  return request({
    url: '/function/garage/check',
    method: 'put',
    data: data
  })
}

// 删除商户
export function delGarage(id) {
  return request({
    url: '/function/garage/' + id,
    method: 'delete'
  })
}
